from utils import device

device.running_ticks_us("lib.config.index.1")


from lib.config.wifi import WifiConfig
from lib.config.device import DeviceConfig
from lib.config.user import UserConfig
from lib.config.sensor import SensorConfig
from lib.config.server import ServerConfig
from lib.config.service import ServiceConfig
from lib.config.websocket import WebsocketConfig
from lib.config.ble import BLEConfig
from lib.config.log import LogConfig
from lib.config.mqtt import MqttConfig
from lib.config.firmware import FirmwareConfig

wifi_config = WifiConfig("wifi.json")
device_config = DeviceConfig("device.json")
user_config = UserConfig("user.json")
sensor_config = SensorConfig("sensor.json")
server_config = ServerConfig("server.json")
service_config = ServiceConfig("service.json")
websocket_config = WebsocketConfig("websocket.json")
ble_config = BLEConfig("ble.json")
log_config = LogConfig("log.json")
mqtt_config = MqttConfig("mqtt.json")
firmware_config = FirmwareConfig("firmware.json")


def get_all_configs():
    return {
        "wifi_config": wifi_config.get_config(),
        "device_config": device_config.get_config(),
        "user_config": user_config.get_config(),
        "server_config": server_config.get_config(),
        "service_config": service_config.get_config(),
        "websocket_config": websocket_config.get_config(),
        "ble_config": ble_config.get_config(),
        "log_config": log_config.get_config(),
        "mqtt_config": mqtt_config.get_config(),
        "firmware_config": firmware_config.get_config(),
        "sensor_config": sensor_config.get_config(),
    }
device.running_ticks_us("lib.config.index.2")
